package com.itcast.googleplay.holder;

import com.itcast.googleplay.R;
import com.itcast.googleplay.utils.UIUtils;
import android.view.View;
import android.widget.TextView;

public class TitleHolder extends BaseHolder<Object> {

	private TextView tvTitle;

	@Override
	public void initData() {
		Object object = getData();
		if(object instanceof String){
			String title = (String)object;
			tvTitle.setText(title);
		}
	}

	@Override
	public View initView() {
		View view = UIUtils.inflate(R.layout.layout_category_title);
		tvTitle = (TextView) view.findViewById(R.id.tv_title);
		return view;
	}

}
